package com;

import com.common.service.CommonService;
import com.common.util.BaseMainTestClass;
import com.common.util.MainTestUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * Date 2018/07/05
 *
 * @author MT-Lin
 */
@SuppressWarnings("ALL")
public class StartUpCheckMain extends BaseMainTestClass {

    private static Logger logger = LoggerFactory.getLogger(StartUpCheckMain.class);

    public static void main(String[] args) throws InterruptedException, IOException {
        System.setProperty("java.net.preferIPv4Stack", "true");
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                new String[]{"META-INF/spring/dubbo-start-up-check.xml"});
        context.start();
        CommonService commonService = context.getBean(CommonService.class);
        commonService.getFromWhere("dubbo-start-up-check","dubbo-start-up-check.xml");
        System.in.read();
//        MainTestUtil.outResponse(
//                "dubbo-start-up-check",
//                "dubbo-start-up-check.xml",
//                new StartUpCheckMain()
//        );
    }

    @Override
    public void setLogger() {
        super.setLogger(LoggerFactory.getLogger(StartUpCheckMain.class));
    }
}
